'use strict';

const Controller = require('egg').Controller;
const fs = require("fs")
const path = require("path")
class ProductController extends Controller {
    async goodslist() {
        const { ctx } = this;

        const readData = fs.readFileSync(path.resolve(__dirname, "..", "public/data.json"), { encoding: "utf-8", flag: "r" })

        ctx.body = JSON.parse(readData)
    }
}

module.exports = ProductController;
